package exception;

import java.awt.*;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.SQLException;

public class ThrowsDemo {
    public void dosome()throws IOException, AWTException{}
}
class SubClass extends ThrowsDemo{
//    public void dosome()throws IOException, AWTException{}
//    (1)
//    public void dosome(){}
//    (2)
//    public void dosome()throws IOException{}
//    (3)
//    public void dosome()throws FileNotFoundException {}
//    (4)不允许抛出额外异常(超类方法没有声明的且不存在继承关系的)
//    public void dosome()throws SQLException {}
//    (5)不允许抛出超类方法抛出异常的超类型异常
//    public void dosome()throws Exception {}

}
